<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <title></title>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge">
    <link rel="stylesheet" type="text/css" href="../resources/css/bootstrap.css">
    <link rel="stylesheet" type="text/css" href="../resources/css/bootstrap-datetimepicker.min.css">
    <link rel="stylesheet" href="../resources/css/grumble.css">

    <script type="text/javascript" src="../resources/scripts/jquery-1.11.1.min.js"></script>
    <script type="text/javascript" src="../resources/scripts/bootstrap.js"></script>
    <script type="text/javascript" src="../resources/scripts/bootstrap-datetimepicker.min.js"></script>
    <script type="text/javascript" src="../resources/scripts/bootstrap-datetimepicker.zh-CN.js"></script>
    <script type="text/javascript" src="../resources/scripts/jquery.grumble.min.js"></script>
    <script type="text/javascript" src="../resources/scripts/zhBase.js"></script>
    <script type="text/javascript" src="../resources/scripts/zhForm.js"></script>
    <script type="text/javascript" src="../resources/scripts/exam/addAnswer.js"></script>
    <script>
        $(function () {

            /**
             * 提交后的响应函数
             * @param data 服务器返回
             */
            function deal(data) {
                alert(data.msg);
            }

            var zf = new zhForm($("#formId"));
            $("#btnid").click(function () {
                var isSuccess = zf.verify();
                if (isSuccess) {
                    zf.submitForm(deal);
                }
            });
        });
    </script>
</head>
<BODY class="mian_bg">
<TABLE cellSpacing=0 cellPadding=0 width="100%" align=center border=0>
    <TR height=28>
        <TD class="addr_td">&nbsp;&nbsp;<img src="/sys/resources/images/addr_icon.png">&nbsp;当前位置: 自建考试>新增考试题目</TD>
    </TR>
    <TR>
        <TD bgColor=#7ca600 height=1></TD>
    </TR>
    <TR>
        <TD bgColor=#8ebe00 height=1></TD>
    </TR>
</TABLE>

<div class="container">
    <div class="panel panel-default">
        <div class="panel-heading">
            <h3 class="panel-title">新增考试题目</h3>
        </div>
        <div class="panel-body">
            <form action="/sys/examTest/addData.do" id="formId" class="form-horizontal" role="form">

                <div class="row">
                    <div class="col-xs-2">
                    </div>
                    <div class="col-xs-4">
                            <div class="input-group" style="margin-bottom: 20px">
                                <div class="input-group-addon">自建考试类型</div>
                                <select name="examid" class="form-control" notNull="true">
                                    <option value="" selected></option>
                                    <c:forEach var="item" items="${listExam}">
                                        <option value="${item.id}">${item.name}</option>
                                    </c:forEach>
                                </select>
                            </div>
                    </div>
                    <div class="col-xs-2">
                    </div>
                </div>

                <div class="row">
                    <div class="col-xs-8">
                        <div class="form-group">
                            <label for="title" class="col-sm-3 control-label">题目名称</label>
                             <input type="hidden" value="" name="data" id="data"/>
                            <div class="col-sm-9">
                                <textarea id="title" name="title" class="form-control" notNull="true" rows="3"></textarea>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row" id="rowChoose" style="display: block;">
                    <div class="col-xs-2">
                    </div>
                    <div class="col-xs-4">
                        <div style="margin-bottom: 20px">
                            <label class="radio-inline ">
                                <input name="issingle" type="radio" notNull="true" value="1" checked="checked"> 单选
                            </label>
                            <label class="radio-inline">
                                <input name="issingle" type="radio" value="0"> 多选
                            </label>
                        </div>
                    </div>
                    <div class="col-xs-2">
                    </div>
                </div>

                <div class="row">
                    <div class="col-xs-2">
                    </div>
                    <div class="col-xs-4">
                        <div style="margin-bottom: 20px">
                             <button type="button" id="btadddid"  class="btn btn-success btn-block">添加题目及答案</button>
                        </div>
                    </div>
                    <div class="col-xs-2">
                    </div>
                </div>

                <%--<div class="row rowdiv" id="rowDiv1">--%>
                    <%--<div class="col-xs-2">--%>
                    <%--</div>--%>
                    <%--<div class="col-xs-4">--%>
                        <%--<div class="form-group">--%>
                            <%--<label for="answer" class="col-sm-3 control-label">题目答案</label>--%>

                            <%--<div class="col-sm-9">--%>
                                <%--<textarea name="title" class="form-control" notNull="true" id="answer"--%>
                                          <%--rows="3"></textarea>--%>
                            <%--</div>--%>
                        <%--</div>--%>
                    <%--</div>--%>
                    <%--<div class="col-xs-2">--%>
                        <%--<label class="radio-inline ">--%>
                            <%--<input name="right"  type="radio" notNull="true" value="option1"> 正确答案--%>
                        <%--</label>--%>
                    <%--</div>--%>
                    <%--<div class="col-xs-2">--%>
                        <%--<button type="button" name="btndelid" class="btn btn-danger" onclick="deleteRowDiv('rowDiv1')">删除</button>--%>
                    <%--</div>--%>
                    <%--<div class="col-xs-2">--%>
                    <%--</div>--%>
                <%--</div>--%>

                <%--<div class="row rowdiv" id="rowDiv2">--%>
                    <%--<div class="col-xs-2">--%>
                    <%--</div>--%>
                    <%--<div class="col-xs-4">--%>
                        <%--<div class="form-group">--%>
                            <%--<label for="answer" class="col-sm-3 control-label">题目答案</label>--%>

                            <%--<div class="col-sm-9">--%>
                                <%--<textarea name="answer" class="form-control" notNull="true" id="answer1"--%>
                                          <%--rows="3"></textarea>--%>
                            <%--</div>--%>
                        <%--</div>--%>
                    <%--</div>--%>
                    <%--<div class="col-xs-2">--%>
                        <%--<div class="checkbox">--%>
                            <%--<label>--%>
                                <%--<input name="checkName" minNum="0" maxNum="2" value="1" type="checkbox"> 正确答案--%>
                            <%--</label>--%>
                        <%--</div>--%>
                    <%--</div>--%>
                    <%--<div class="col-xs-2">--%>
                        <%--<button type="button" name="btndelid" class="btn btn-danger">删除</button>--%>
                    <%--</div>--%>
                    <%--<div class="col-xs-2">--%>
                    <%--</div>--%>
                <%--</div>--%>

                <%--<div class="row" id="rowButton">--%>
                    <%--<div class="col-xs-2">--%>
                    <%--</div>--%>
                    <%--<div class="col-xs-4">--%>
                        <%--<button type="button" id="btnid" class="btn btn-success btn-block">提交</button>--%>
                    <%--</div>--%>
                    <%--<div class="col-xs-2">--%>
                    <%--</div>--%>
                <%--</div>--%>
            </form>
        </div>
    </div>
</div>
</body>
</html>
